$('.right-titleicon').on("click", function(e) {
	projectVM.showMenulist()
})

projectVM = new Vue({
	el: "#content",
	filters: {
		toDate(e) {
			e = e.split(' ')[0]
			return e
		}
	},
	data: {
		approveDesc: '',
		approveDialogTips: true,
		isApprove: false,
		isMyEditor: false,
		workStatus: '20',
		dealingPerson: 'P129951',
		//dealingPerson: 'P129952',
		// 是否是编辑
		isEdit: false,
		// 编辑对应行
		index: 0,
		approveCodeName: '',
		workDesc: '网络安全',
		workType: '0115',
		// 流程id
		workId: "3d7bf4a9c239442c99a8708f55149ee2", // 获取流程日志所需待办Id
		addOrEdit: false,
		isEditor: false,
		initNetSafeDeviceInfoList: [],
		formData: {
			networkSafeInfoId: '', // 网络安全防护设备检查明细主键
			networkSafeId: '', // 网络安全防护设备检查批次主键
			checkDate: 123,
			checkStaffCodeName: 'alwin', // 新增时测试人为当前登陆人
			checkStaffCode: 'p123123',
			checkStaffName: 'asd',
			deviceName: '', //设备名称
			bay: '', // 所属间隔
			isWarning: '0', // 默认不告警
			isAmbientNormal: '1', // 默认环境正常
			isHaveAbnormalDevice: '0', // 默认无不正常设备
			problemLog: '' // 问题记录
		},
		onStatus: false,
		showPop: false,
		showMenu: false,
		showAdd: false,
		elseDesc: '',
		//删除数据
		delNetSafeDeviceInfoList: [],
		networkSafe: {
			"networkSafeId": "",
			"workId": "",
			"workDesc": "网络安全防护设备定期检查",
			"elseDesc": ""
		},
		defectInfoList: [],
		menuList: [{
			name: '新增',
			path: 'list.html'
		}, {
			name: '列表',
			path: 'index.html'
		}, ],
		filterText: 'all', //筛选条件
		list: [],
		currentUser: {},
	},
	components: {
		personselect,
		processlog
	},
	created() {
		console.log(JSON.parse(localStorage.getItem('neiosUser')))
		console.log(localStorage.getItem('todoWork'))
		this.workId = JSON.parse(localStorage.getItem('todoWork')).obj.workId
		this.workStatus = JSON.parse(localStorage.getItem('todoWork')).obj.workStatus
		this.currentUser = JSON.parse(localStorage.getItem('neiosUser'))
		if (this.workStatus == '20') {
			this.isMyEditor = true

		}
		let dictCodes =
			'NET_SAFE_INFO';
		let dict = mui.neiosCommon.queryDict(dictCodes, (data) => {
			if (data != '') {
				this.initNetSafeDeviceInfoList = data.NET_SAFE_INFO;
				console.log(JSON.stringify(this.initNetSafeDeviceInfoList))
				console.log(this.initNetSafeDeviceInfoList.length)
			}
		})
		//网络安全列表
		let param = {
			"workId": this.workId
		}
		mui.neiosRequst.httpRequst('/app/regularWork/networkSafeDeviceCheck/getNetSafeDeviceCheckInfoList', param,
			(data) => {
				if (data.code == '0') {
					this.list = data.data.networkSafeInfoList ? data.data.networkSafeInfoList : [],
						this.list.map((v, i) => {
							v.dataSource = 'NEIOS_APP'+localStorage.getItem("currVersion")
						})
					this.networkSafe.networkSafeId = data.data.networkSafeId
					this.networkSafe.workId = this.workId
					this.elseDesc = data.data.elseDesc == null ? "" : data.data.elseDesc;
					if (data.data.networkSafeId == null || data.data.networkSafeId == "") {
						if (this.currentUser["stationNewCode"] != null && this.currentUser["stationNewCode"] != "") {
							let param = {
								"newStationCode": this.currentUser["stationNewCode"]
							}
							console.log(JSON.stringify(param))
							mui.neiosRequst.httpRequst('/app/regularWork/networkSafeDeviceCheck/getLastNetworkSafeInfoList', param,
								(data) => {
									if (data.code == '0') {
										let lastNetworkSafeInfoList = data.data;
										console.log(JSON.stringify(data.data))
										//存在历史记录
										if (lastNetworkSafeInfoList != null && lastNetworkSafeInfoList.length > 0) {
											//带出该场站上次审核完成提交的设备名称和间隔
											lastNetworkSafeInfoList.forEach(e => {
												let netSafeDeviceInfo = {
													networkSafeInfoId: '', // 网络安全防护设备检查明细主键
													networkSafeId: '', // 网络安全防护设备检查批次主键
													checkDate: this.getTime(new Date(), 'day'),
													checkStaffCodeName: this.currentUser["userName"], // 新增时测试人为当前登陆人
													checkStaffCode: this.currentUser["userId"],
													checkStaffName: this.currentUser["name"],
													deviceName: e.deviceName, //设备名称
													bay: e.bay, // 所属间隔
													isWarning: '0', // 默认不告警
													isAmbientNormal: '1', // 默认环境正常
													isHaveAbnormalDevice: '0', // 默认无不正常设备
													problemLog: '' // 问题记录
												}
												this.list.push(netSafeDeviceInfo);
											});
										} else { //场站首次办理
											console.log(this.initNetSafeDeviceInfoList.length)
											this.initNetSafeDeviceInfoList.forEach(e => {
												let netSafeDeviceInfo = {
													networkSafeInfoId: '', // 网络安全防护设备检查明细主键
													networkSafeId: '', // 网络安全防护设备检查批次主键
													checkDate: this.getTime(new Date(), 'day'),
													checkStaffCodeName: this.currentUser["userName"], // 新增时测试人为当前登陆人
													checkStaffCode: this.currentUser["userId"],
													checkStaffName: this.currentUser["name"],
													deviceName: e.itemText, //设备名称
													bay: e.itemDesc, // 所属间隔
													isWarning: '0', // 默认不告警
													isAmbientNormal: '1', // 默认环境正常
													isHaveAbnormalDevice: '0', // 默认无不正常设备
													problemLog: '' // 问题记录
												}
												this.list.push(netSafeDeviceInfo);
											});
										}

									} else {
										mui.toast("获取数据错误：" + data.msg);
									}
								},
								(data) => {
									mui.toast("查询历史检查记录失败");

								}
							);
						} else {
							mui.toast("用户场站信息为空，无法查询历史检查记录");
						}
					}
				} else {
					mui.toast("获取数据错误：" + data.msg);
				}
			},
			(data) => {
				mui.toast("获取数据错误：" + data.msg);
			}
		);
	},
	beforeDestroy() {},
	methods: {
		clickStop() {

		},
		//判断是否显示办理
		isShowHandle() {
			if (this.workStatus == '30') {
				return true
			} else {
				return false
			}
		},
		//判断是否显示编辑
		isShowEdit() {
			if (this.workStatus == '20') {
				return true
			} else {
				return false
			}
		},
		// 删除
		del(item, index) {
			var btnArray = ['取消', '确定'];
			mui.confirm('是否确认删除？', '提示', btnArray, (e) => {
				if (e.index == 1) {
					this.list.splice(index, 1)
					if (item.networkSafeInfoId != null && typeof(item.networkSafeInfoId) != "undefined" && item.networkSafeInfoId !=
						"") {
						this.delNetSafeDeviceInfoList.push(item);
					}
				} else {

				}
			})

		},
		// 新增添加
		addList() {
			// networkSafeInfoId: '', // 网络安全防护设备检查明细主键
			// networkSafeId: '', // 网络安全防护设备检查批次主键
			// checkDate: 123,
			// checkStaffCodeName: 'alwin', // 新增时测试人为当前登陆人
			// checkStaffCode: 'p123123',
			// checkStaffName: 'asd',
			// deviceName: '', //设备名称
			// bay: '', // 所属间隔
			// isWarning: '0', // 默认不告警
			// isAmbientNormal: '1', // 默认环境正常
			// isHaveAbnormalDevice: '0', // 默认无不正常设备
			// problemLog: '' ,// 问题记录

			if (!this.formData.deviceName) {
				mui.toast("请输入设备名称");
			} else if (!this.formData.bay) {
				mui.toast("请输入所属间隔");
			} else {
				if (this.formData.isWarning != '0' || this.formData.isAmbientNormal != '1' || this.formData.isHaveAbnormalDevice !=
					'0') {
					if (this.formData.problemLog) {
						this.addOrEdit = false
						if (!this.isEdit) {
							this.list.unshift(this.formData)
							this.formData = {
								networkSafeInfoId: '', // 网络安全防护设备检查明细主键
								networkSafeId: '', // 网络安全防护设备检查批次主键
								checkDate: 123,
								checkStaffCodeName: '[pxmwwzi]王志', // 新增时测试人为当前登陆人
								checkStaffCode: 'pxmwwzi',
								checkStaffName: '王志',
								deviceName: '', //设备名称
								bay: '', // 所属间隔
								isWarning: '0', // 默认不告警
								isAmbientNormal: '1', // 默认环境正常
								isHaveAbnormalDevice: '0', // 默认无不正常设备
								problemLog: '' // 问题记录
							}
						} else {
							this.list.splice(this.index, 1, this.formData)
						}
						this.clearFormateData()
					} else {
						mui.toast("请输入问题记录");
					}

				} else {
					this.addOrEdit = false
					if (!this.isEdit) {
						this.list.unshift(this.formData)
						this.formData = {
							networkSafeInfoId: '', // 网络安全防护设备检查明细主键
							networkSafeId: '', // 网络安全防护设备检查批次主键
							checkDate: 123,
							checkStaffCodeName: '[pxmwwzi]王志', // 新增时测试人为当前登陆人
							checkStaffCode: 'pxmwwzi',
							checkStaffName: '王志',
							deviceName: '', //设备名称
							bay: '', // 所属间隔
							isWarning: '0', // 默认不告警
							isAmbientNormal: '1', // 默认环境正常
							isHaveAbnormalDevice: '0', // 默认无不正常设备
							problemLog: '' // 问题记录
						}
					} else {
						this.list.splice(this.index, 1, this.formData)
					}
					this.clearFormateData()
				}
			}
		},
		// 清楚编辑信息
		clearFormateData() {
			this.addOrEdit = false
			
			this.formData = {
				networkSafeInfoId: '', // 网络安全防护设备检查明细主键
				networkSafeId: '', // 网络安全防护设备检查批次主键
				checkDate: 123,
				checkStaffCodeName: 'alwin', // 新增时测试人为当前登陆人
				checkStaffCode: 'p123123',
				checkStaffName: 'asd',
				deviceName: '', //设备名称
				bay: '', // 所属间隔
				isWarning: '0', // 默认不告警
				isAmbientNormal: '1', // 默认环境正常
				isHaveAbnormalDevice: '0', // 默认无不正常设备
				problemLog: '' // 问题记录
			}
		},
		add() {
			this.isEdit = false
			this.addOrEdit = true
			this.formData.checkDate = this.getTime(new Date(), 'day')
			this.formData.checkStaffCodeName = this.currentUser.userName
			this.formData.checkStaffCode = this.currentUser.userId;
			this.formData.checkStaffName = this.currentUser.name;
			this.formData.dataSource = 'NEIOS_APP'+localStorage.getItem("currVersion")
		},
		//新巡视人若编辑了历史信息则对应巡视人为新巡视人否则保持为原巡视人
		changeCheck(e) {
			this.formData.checkStaffCodeName = this.currentUser.userName
			this.formData.checkStaffCode = this.currentUser.userId;
			this.formData.checkStaffName = this.currentUser.name;

		},
		edit(item, index) {
			this.isEdit = true
			this.addOrEdit = true
			this.index = index
			this.formData = JSON.parse(JSON.stringify(item))
			this.formData.checkStaffCodeName = "[" + this.formData.checkStaffCode + "]" + this.formData.checkStaffName
			this.formData.checkDate = this.getTime(new Date(), 'day')
		},
		//获取时间
		getTime(myDate, type) {
			console.log(12)
			console.log(type)
			var realYear = myDate.getFullYear();
			var myMonth = myDate.getMonth() + 1;
			var realMonth = myMonth;
			var myDay = myDate.getDate();
			var realDay = myDay;
			var myHour = myDate.getHours();
			var realHours = myHour;
			var myMinute = myDate.getMinutes();
			var realMinute = myMinute;
			var mySecond = myDate.getSeconds();
			var realSecond = mySecond;
			if (myMonth < 10) {
				realMonth = "0" + myMonth;
			}
			if (myDay < 10) {
				realDay = "0" + myDay;
			}
			if (myMinute < 10) {
				realMinute = "0" + myMinute;
			}
			if (myHour < 10) {
				realHours = "0" + myHour;
			}
			if (mySecond < 10) {
				realSecond = "0" + mySecond;
			}
			var realDate = realYear + '-' + realMonth + '-' + realDay + ' ' + realHours + ':' + realMinute + ':' +
				realSecond;
			if (type == "sec") {
				realDate = realYear + '-' + realMonth + '-' + realDay + ' ' + realHours + ':' + realMinute + ':' + realSecond;
			} else if (type == "min") {
				realDate = realYear + '-' + realMonth + '-' + realDay + ' ' + realHours + ':' + realMinute;
			} else if (type == "hour") {
				realDate = realYear + '-' + realMonth + '-' + realDay + ' ' + realHours;
			} else if (type == "day") {
				realDate = realYear + '-' + realMonth + '-' + realDay;
			} else if (type == "month") {
				realDate = realYear + '-' + realMonth;
			} else if (type == "year") {
				realDate = realYear;
			}
			return realDate;
		},
		navTo(e, data) {
			if (data) {
				window.localStorage.setItem("itme", JSON.stringify(data))
			} else {
				window.localStorage.setItem("itme", '')
			}
			mui.openWindow({
				url: e,
				id: 'my',
				extras: {
					'item': data
				},
				waiting: {
					autoShow: false
				}
			});
		},
		// 清除隐患描述
		clearDefectInfo() {
			this.showAdd = false
			this.isApprove = false
			this.defectInfoList = []
			this.approveDesc = ''
			this.networkSafe.elseDesc = ''
		},
		// 初始化隐患描述
		initDefectInfo() {
			this.showAdd = true
			this.list.forEach(e => {
				
				if (e.isWarning != '0') {
					let defectInfoDesc = `网络安全防护设备定期检查：[${e.bay}]${e.deviceName}。检查项：是否有告警。不合格`;
					this.defectInfoList.push({
						"name": defectInfoDesc,
					});
				}
				if (e.isAmbientNormal != '1') {
					let defectInfoDesc = `网络安全防护设备定期检查：[${e.bay}]${e.deviceName}。检查项：运行环境是否正常。不合格`;
					this.defectInfoList.push({
						"name": defectInfoDesc,
					});
				}
				if (e.isHaveAbnormalDevice != '0') {
					let defectInfoDesc = `网络安全防护设备定期检查：[${e.bay}]${e.deviceName}。检查项：是否有非正常业务设备。不合格`;
					this.defectInfoList.push({
						"name": defectInfoDesc,
					});
				}
			})
		},
		// 初始化通过隐患描述
		approveInitDefectInfo(type) {
			if (type == 'approve') {
				this.approveDialogTips = true
			} else {
				this.approveDialogTips = false
			}
			this.isApprove = true
			this.list.forEach(e => {
				if (e.isWarning != '0') {
					let defectInfoDesc = `网络安全防护设备定期检查：[${e.bay}]${e.deviceName}。检查项：是否有告警。不合格`;
					this.defectInfoList.push({
						"name": defectInfoDesc,
					});
				}
				if (e.isAmbientNormal != '1') {
					let defectInfoDesc = `网络安全防护设备定期检查：[${e.bay}]${e.deviceName}。检查项：运行环境是否正常。不合格`;
					this.defectInfoList.push({
						"name": defectInfoDesc,
					});
				}
				if (e.isHaveAbnormalDevice != '0') {
					let defectInfoDesc = `网络安全防护设备定期检查：[${e.bay}]${e.deviceName}。检查项：是否有非正常业务设备。不合格`;
					this.defectInfoList.push({
						"name": defectInfoDesc,
					});
				}
			})
		},
		// 退回&&通过
		saveApprove() {
			//通过
			if (this.approveDialogTips) {
				let param = {
					"workId": this.workId,
					"workType": this.workType,
					"workDesc": this.workDesc,
					"companyCode": this.currentUser.companyCode,
					"stationCode": this.currentUser.stationCode,
					"approveDesc": this.approveDesc,
					"questionArr": this.defectInfoList,
				};
				mui.neiosRequst.httpRequst('/app/regularWork/networkSafeDeviceCheck/approveNetworkSafeInfo', param,
					(data) => {
						if (data.code == '0') {
							mui.toast("通过成功");
							this.goBack()
						}
					},
					() => {
						console.log("通过失败!");
					}
				);

			} else {
				// 退回	
				if (this.approveDesc) {
					let param = {
						"workId": this.workId,
						"workType": this.workType,
						"nodeDealStaffCode": this.currentUser.userId,
						"nodeDealStaffName": this.currentUser.name,
						"approveDesc": this.approveDesc,
						"nodeDealStaffRole": '0',
						"forwardNode": '1',
						"nodeVisibleRange": '20',
						"questionArr": this.defectInfoList,
					};
					mui.neiosRequst.httpRequst('/app/personWork/sendBack', param,
						(data) => {
							if (data.code == '0') {
								mui.toast("退回成功");
								this.goBack()
							} else {
								mui.toast("退回失败");
							}
						},
						() => {
							console.log("退回失败!");
						}
					);
				} else {
					mui.toast("请输入意见描述");
				}
			}
		},
		getName(data) {
			console.log(data)
			if (data) {
				let list = []
				data.split(',').map((v) => {
					list.push(v.split(']')[1])
				})
				return list.join(',');
			} else {
				return data
			}
		
		},
		// 保存
		save(type) {
			if (type) {
				if (this.$refs.personselect.person) {
					let approveCodeName = this.$refs.personselect.person
					let approveName = this.getName(this.$refs.personselect.person)
					let approveCode = this.$refs.personselect.personids
					let param = {
						"networkSafe": this.networkSafe,
						"networkSafeInfoList": this.list,
						"delNetSafeDeviceInfoList": this.delNetSafeDeviceInfoList,
						//todo  列表传过来的值
						"defect": {
							"workId": this.workId,
							"workType": this.workType
						},
						"questionArr": this.defectInfoList,
						"approveCodeName": this.$refs.personselect.person,
						"workId": this.workId,
						"workType": this.workType,
						"companyCode": this.currentUser.companyCode,
						"stationCode": this.currentUser.stationCode,
						'userId': this.currentUser.userId,
						'userName': this.currentUser.name,
						'approveCode': approveCode, //审核人
						'approveName': approveName, //审核人
					}
					mui.neiosRequst.httpRequst('/app/regularWork/networkSafeDeviceCheck/submitNetworkSafeInfo', param,
						(data) => {
							if (data.code == '0') {
								mui.toast("提交成功");
								this.goBack()
							} else {
								mui.toast("提交失败");
							}
						},
						() => {
							mui.toast("提交失败");
						}
					);
				} else {
					mui.toast("请选择审批人");
				}
			} else {
				let param = {
					"networkSafe": {
						"workId": this.workId,
						"workDesc": "网络安全防护设备定期检查",
						"networkSafeId": this.networkSafe.networkSafeId,
					},
					"networkSafeInfoList": this.list,
					"delNetSafeDeviceInfoList": this.delNetSafeDeviceInfoList,
					'userId': this.currentUser.userId,
					'userName': this.currentUser.name,
				}
				mui.neiosRequst.httpRequst('/app/regularWork/networkSafeDeviceCheck/saveOrUpdateNetworkSafeInfo', param,
					(data) => {
						if (data.code == '0') {
							mui.toast("保存成功");
							//网络安全列表
							let param = {
								"workId": this.workId
							}
							mui.neiosRequst.httpRequst('/app/regularWork/networkSafeDeviceCheck/getNetSafeDeviceCheckInfoList', param,
								(data) => {
									if (data.code == '0') {
										this.list = data.data.networkSafeInfoList ? data.data.networkSafeInfoList : [],
											this.list.map((v, i) => {
												v.dataSource = 'NEIOS_APP'
											})
										this.networkSafe.networkSafeId = data.data.networkSafeId
										this.networkSafe.workId = this.workId
										this.elseDesc = data.data.elseDesc == null ? "" : data.data.elseDesc;
										if (data.data.networkSafeId == null || data.data.networkSafeId == "") {
											if (this.currentUser["stationNewCode"] != null && this.currentUser["stationNewCode"] != "") {
												let param = {
													"newStationCode": this.currentUser["stationNewCode"]
												}
												console.log(JSON.stringify(param))
												mui.neiosRequst.httpRequst('/app/regularWork/networkSafeDeviceCheck/getLastNetworkSafeInfoList', param,
													(data) => {
														if (data.code == '0') {
															let lastNetworkSafeInfoList = data.data;
															console.log(JSON.stringify(data.data))
															//存在历史记录
															if (lastNetworkSafeInfoList != null && lastNetworkSafeInfoList.length > 0) {
																//带出该场站上次审核完成提交的设备名称和间隔
																lastNetworkSafeInfoList.forEach(e => {
																	let netSafeDeviceInfo = {
																		networkSafeInfoId: '', // 网络安全防护设备检查明细主键
																		networkSafeId: '', // 网络安全防护设备检查批次主键
																		checkDate: this.getTime(new Date(), 'day'),
																		checkStaffCodeName: this.currentUser["userName"], // 新增时测试人为当前登陆人
																		checkStaffCode: this.currentUser["userId"],
																		checkStaffName: this.currentUser["name"],
																		deviceName: e.deviceName, //设备名称
																		bay: e.bay, // 所属间隔
																		isWarning: '0', // 默认不告警
																		isAmbientNormal: '1', // 默认环境正常
																		isHaveAbnormalDevice: '0', // 默认无不正常设备
																		problemLog: '' // 问题记录
																	}
																	this.list.push(netSafeDeviceInfo);
																});
															} else { //场站首次办理
																console.log(this.initNetSafeDeviceInfoList.length)
																this.initNetSafeDeviceInfoList.forEach(e => {
																	let netSafeDeviceInfo = {
																		networkSafeInfoId: '', // 网络安全防护设备检查明细主键
																		networkSafeId: '', // 网络安全防护设备检查批次主键
																		checkDate: this.getTime(new Date(), 'day'),
																		checkStaffCodeName: this.currentUser["userName"], // 新增时测试人为当前登陆人
																		checkStaffCode: this.currentUser["userId"],
																		checkStaffName: this.currentUser["name"],
																		deviceName: e.itemText, //设备名称
																		bay: e.itemDesc, // 所属间隔
																		isWarning: '0', // 默认不告警
																		isAmbientNormal: '1', // 默认环境正常
																		isHaveAbnormalDevice: '0', // 默认无不正常设备
																		problemLog: '' // 问题记录
																	}
																	this.list.push(netSafeDeviceInfo);
																});
															}

														} else {
															mui.toast("获取数据错误：" + data.msg);
														}
													},
													(data) => {
														mui.toast("查询历史检查记录失败");

													}
												);
											} else {
												mui.toast("用户场站信息为空，无法查询历史检查记录");
											}
										}
									} else {
										mui.toast("获取数据错误：" + data.msg);
									}
								},
								(data) => {
									mui.toast("获取数据错误：" + data.msg);
								}
							);

						} else {
							mui.toast("保存失败");
						}
					},
					() => {
						mui.toast("保存失败");
					}
				);
			}




		},

		//返回上一页
		goBack() {
			let page2 = plus.webview.getWebviewById("../sitOperation/terminalwork/terminalwork.html");
			let param = {}
			param.isRefresh = true
			mui.fire(page2, 'isRefresh', param);
			mui.back()
		},
		//新巡视人若编辑了历史信息则对应巡视人为新巡视人否则保持为原巡视人
		changeCheck() {
			this.formData.checkStaffCode = this.currentUser['userId'];
			this.formData.checkStaffName = this.currentUser['name'];
			this.formData.checkStaffCodeName = this.currentUser['userName'];
		},
		yesNoChange() {
			console.log(this.formData.isWarning)
			let problemFlag;
			let log = "检查项目：";
			if (this.formData.isWarning != '0' || this.formData.isAmbientNormal != '1' || this.formData.isHaveAbnormalDevice !=
				'0') {
				problemFlag = true;
			} else {
				problemFlag = false;
			}
			if (this.formData.isWarning != '0') {
				log = `${log}是否有告警。`;
			}
			if (this.formData.isAmbientNormal != '1') {
				log = `${log}运行环境是否正常。`;
			}
			if (this.formData.isHaveAbnormalDevice != '0') {
				log = `${log}是否有非正常业务设备。`;
			}
			if (problemFlag) {
				log = `${log}异常`;
				this.formData.problemLog = log;
			} else {
				this.formData.problemLog = "";
			}
			this.changeCheck();

		},
		//点击菜单
		menuClick(e) {
			this.navTo(e.path)

		},
		//左上角菜单显示隐藏
		showMenulist() {
			this.showMenu ? this.showMenu = false : this.showMenu = true
		},
		//切换筛选条件
		changeFliter(e) {
			this.filterText = e
		},
		showPop() {
			this.show_popup = true
		},
		hidePopup() {
			this.show_popup = false
		},

	}

})



// mui.init({
// 	pullRefresh: {
// 		container: "#scroll", //待刷新区域标识，querySelector能定位的css选择器均可，比如：id、.class等
// 		down: { //下拉刷新
// 			style: 'circle',
// 			height: 50, //可选,默认50.触发下拉刷新拖动距离,
// 			auto: false, //可选,默认false.首次加载自动下拉刷新一次
// 			contentdown: "下拉可以刷新", //可选，在下拉可刷新状态时，下拉刷新控件上显示的标题内容
// 			contentover: "释放立即刷新", //可选，在释放可刷新状态时，下拉刷新控件上显示的标题内容
// 			contentrefresh: "正在刷新...", //可选，正在刷新状态时，下拉刷新控件上显示的标题内容
// 			callback: async function() { //必选，刷新函数，根据具体业务来编写，比如通过ajax从服务器获取新数据；
// 				page = 0;

// 				////没有更多内容了，endPulldown 传入true， 不再执行下拉刷新
// 				mui('#scroll').pullRefresh().endPulldownToRefresh();
// 				mui('#scroll').pullRefresh().enablePullupToRefresh();
// 				mui('#scroll').pullRefresh().endPullupToRefresh(true);
// 			}
// 		},
// 		up: { //上拉加载
// 			height: 50, //可选.默认50.触发上拉加载拖动距离
// 			auto: false, //可选,默认false.自动上拉加载一次
// 			contentrefresh: "正在加载...", //可选，正在加载状态时，上拉加载控件上显示的标题内容
// 			contentnomore: '没有更多数据了', //可选，请求完毕若没有更多数据时显示的提醒内容；
// 			callback: async function() { //必选，刷新函数，根据具体业务来编写，比如通过ajax从服务器获取新数据；

// 			}
// 		}
// 	}
// });
